package com.jair.crawler.opm.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class DbConnection {
	private Connection conn = null;
	public void getConn(){ 
		 try {
			 Statement stmt = null;
			 ResultSet rs = null;
			conn = DriverManager.getConnection("jdbc:mysql://10.237.36.241:3312/xmr_data?user=xiaomiren&password=CzYfBWBsC6d60bS95A8CZSpZZNDyybHf");
			stmt = conn.createStatement();
		    rs = stmt.executeQuery("SELECT * FROM gss_channel_data");
		 } catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			try {
				conn.close();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

	}
}
